package com.xnyzc.lhy.didi.entity.param.xiecheng.response;

import com.xnyzc.lhy.didi.common.constants.EXieChengResponseConstant;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class OrderDriverLocationDTO {
    private List<DriverLocationDTO> driverLocationInfo;//司机位置信息
    private long ctripPurchaseOrderId;//携程采购单号	881823967638342968	18位
    private String msgCode;//是	响应码	OK	响应码
    private String message;//否	响应详情	成功	响应码

    public void addDriverLocationDTO(DriverLocationDTO locationDTO) {
        if (driverLocationInfo == null) {
            driverLocationInfo = new ArrayList<>();
        }
        driverLocationInfo.add(locationDTO);
    }

    public void wrap(EXieChengResponseConstant constant) {
        this.msgCode = constant.getCode();
        this.message = constant.getDesc();
    }
}
